<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf8" />
        <meta name="content-language" content="en" />
        <title>Application</title>

        <link rel="stylesheet" type="text/css" href="lib/ext/Ext/resources/css/ext-all.css"></link>
        <link rel="stylesheet" type="text/css" href="lib/ext/Ext/resources/css/xtheme-gray.css"></link>
        <link rel="stylesheet" type="text/css" href="lib/openlayers/theme/default/style.css"></link>
        <link rel="stylesheet" type="text/css" href="app/css/main.css"></link>

        <script type="text/javascript" src="lib/ext/Ext/adapter/ext/ext-base.js"></script>

        <!-- debug mode (begin) -->
        <script type="text/javascript" src="lib/ext/Ext/ext-all.js"></script>
        <script type="text/javascript" src="app/lib/App/OpenLayers.js"></script>
        <script type="text/javascript" src="app/lib/App/GeoExt.js"></script>
        <script type="text/javascript" src="app/lib/App/layout2.js"></script>
        <script type="text/javascript" src="app/lib/App/main.js"></script>
        <!-- debug mode (end) -->

        <!-- non debug mode (begin) -->
        <!--
        <script type="text/javascript" src="build/app.js"></script>
        -->
        <!-- non debug mode (end) -->
        <script type="text/javascript">

        	var mapa;
        	function localizarPunto(bbox,map,layer){
	        	//alert("entra en localizar punto");
	        	
	    		var res= bbox.split(";");
	    		var param = res[0].split("-");
	
	    		var minx = param[0];
	    		var miny = param[1];
	    		var maxx = param[2];
	    		var maxy = param[3];
	
	
	    		var bounds = new OpenLayers.Bounds(minx, miny, maxx, maxy);
	    		map.zoomToExtent(bounds,true);
	    		var b=res[1];
	    		//alert(b);
	    		if(b != "null") {
	    			param = res[1].split("-");
	    			//alert(param);
		    		minx = param[0];
		    		miny = param[1];
		    		maxx = param[2];
		    		maxy = param[3];
		    		bounds = new OpenLayers.Bounds(minx, miny, maxx, maxy);
		    		map.zoomToExtent(bounds,true);
		    		var b1 = res[2];
		    		pintaPunto(b1,map,layer);	
			    }else{
			    	layer.removeFeatures(layer.features);
			    	parent.document.getElementById("form:coordenadaX").value = "";
					parent.document.getElementById("form:coordenadaY").value = "";
				}
			    
	    		//drawmultipoint(b,'green');
	    		//alert("despues del zoom");
    		}


        	 function pintaPunto(multipoint, map, layer){


        			if (multipoint==null || multipoint=='') { return; }

        			//alert("entra en pintar" + multipoint);
        	        var pointList = [];
        			var minx = 999999999;
        			var miny = 999999999;
        			var maxx = 0;
        			var maxy = 0;
        			var minRad=5;
        			var minRad=40;

        		 	var styleGeometry;

        			
        			//var arraypuntos = multipoint.split("-");
        			//alert(arraypuntos[0]);
        			//for(var i=0; i<arraypuntos.length; i++) {
						//alert(multipoint);
        				var coord = multipoint.split(" ");
        				//alert("entra despues de splitear");
        				//alert(coord[0]+" " +coord[1]);
        				pointList=[];
        				
        				var newPoint = new OpenLayers.Geometry.Point(coord[0],coord[1]);
        				
        				pointList.push(newPoint);
        				var multipunto = new OpenLayers.Geometry.MultiPoint(pointList);
        				var pointFeature;
        				
        				pointFeature = new OpenLayers.Feature.Vector(multipunto);

        				layer.addFeatures([pointFeature]);
        			//}
        			//var multipunto = new OpenLayers.Geometry.MultiPoint(pointList);
        			//var pointFeature = new OpenLayers.Feature.Vector(multipunto,null,styleGeometry);
        			//alert("esta creando los puntos");


        			//config.objects.mainMap.map.zoomToExtent(multipunto.getBounds());
        			//multipunto.calculateBounds();


        		}
     		
        </script>
		
    </head>

    <body>
    </body>
<html>
